package com.huangwei.dao;

import com.huangwei.model.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface UserDao {
    public int add(User user);
    public int delete(int userId);
    public int update(User user);
    public User queryOne(int userId);
    public User queryOneByPhone(String phone);
    public User queryOneToLogin(@Param("phone") String phone,
                                @Param("password") String password);
    public List<User> queryAll();
}
